package com.apptravel.util;

import org.apache.commons.codec.digest.DigestUtils;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 2012-1-16
 * Time: 9:41:46
 * To change this template use File | Settings | File Templates.
 */
public class DateUtil {

    public static String formatDate(Date date,String formatter){
        DateFormat df = new SimpleDateFormat(formatter);
        return df.format(date);
    }

    public static void main(String arg[]){
        String pwd = DigestUtils.md5Hex("123456");
        System.out.println(pwd);
    }
}
